package br.com.qhotel.database.factory;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnectionFactory {

	public Connection getConnection(){
		try {
			return DriverManager.getConnection("jdbc:postgresql://localhost:5432/qhoteldb", "postgres", "1234");
		} catch (SQLException e) {
			throw new RuntimeException();
		}
	}
	
	public static void main(String[] args) {
		
		new ConnectionFactory().getConnection();
		System.out.println("Conexão estabelecida");
		
	}
	
}
